home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 10187 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  525 b 

  1. Path: shrsys.hslc.org!brian
  2. From: brian@shrsys.hslc.org
  3. Newsgroups: comp.lang.c++
  4. Subject: gets() in C++
  5. Date: 6 MAR 96 13:55:43 GMT
  6. Organization: MIT PLASMA FUSION CENTER
  7. Message-ID: <6MAR96.13554357@shrsys.hslc.org>
  8. NNTP-Posting-Host: shrsys.hslc.org
  9.  
  10. In C, gets(string) will read a string from stdin to the newline,
  11. while scanf("%s", string) stops at the first whitespace character.
  12.  
  13. In C++, cin >> string stops at the first whitespace character.
  14. Is there a C++ equivalent to gets()?
  15.  
  16. Stuart Brian (brian@shrsys.hslc.org)
  17.